package com.iotechn.unimall.data.mapper;

import com.baomidou.mybatisplus.mapper.BaseMapper;
import com.iotechn.unimall.data.domain.SalesSendOrderGoodsDO;
import com.iotechn.unimall.data.dto.excel.SkuTotalPriceDTO;
import com.iotechn.unimall.data.dto.statistics.TimeDataDTO;
import com.iotechn.unimall.data.dto.warehouse.SalesSendOrderGoodsDTO;
import org.apache.ibatis.annotations.Param;

import java.util.List;


/**
 * 订单发货仓库商品出库表
 *
 * @author wxw
 * @email
 * @date 2020-03-28 22:54:53
 */
public interface SalesSendOrderGoodsMapper extends BaseMapper<SalesSendOrderGoodsDO> {
    //查询待出库商品（包含当前库的商品数量）
    List<SalesSendOrderGoodsDTO> querySkusByWarehouseId(@Param("warehouseId") Long warehouseId, @Param("skuIds") List<Long> skuIds, @Param("offset") Integer offset, @Param("size") Integer size, @Param("search") String search);

    //统计出库商品
    List<SalesSendOrderGoodsDTO> querySkusByPara(@Param("warehouseId") Long warehouseId, @Param("sOrderId") Long sOrderId, @Param("offset") Integer offset, @Param("size") Integer size, @Param("search") String search);

    //统计
    Integer countSkusByWarehouseId(@Param("warehouseId") Long warehouseId, @Param("skuIds") List<Long> skuIds, @Param("search") String search);

    //出库统计
    List<TimeDataDTO> summarySalesOrderGoodsByTime(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("storeId") Long storeId, @Param("search") String search);

    List<SkuTotalPriceDTO> summaryGoods(@Param("startTime") String startTime, @Param("endTime") String endTime, @Param("skuIds") List<Long> skuIds, @Param("barCodes") List<String> barCodes);
}
